package day15;

import java.util.Scanner;

public class PayRollSystem {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入当月的月份：");
		int month=sc.nextInt();
		//这点不是new 的对象
		Employee[] emps=new Employee[2];
		emps[0]=new SalatriedEmployee("yyfei",1001,new MyDate(1992,10,15),10000);
		emps[1]=new HourEmployee("chenjie",1002,new MyDate(1993,10,10),30,400);
		for (int i = 0; i < emps.length; i++) {
			System.out.println(emps[i]);
			double salary=emps[i].earnings();
			System.out.println("月工资为："+salary);
			
			if(month==emps[i].getBrithday().getMonth()) {
				System.out.println("祝您生日快乐，本月的工资为："+(salary+100));
			}
			
		}
		
		
		
	}
		
		
}
